package cn.gene.timeyan.ums.webapi.ums.mapper;

import cn.gene.timeyan.pojo.ums.model.Attention;
import cn.gene.timeyan.pojo.ums.model.Collect;
import com.baomidou.dynamic.datasource.annotation.DS;
import io.lettuce.core.dynamic.annotation.Param;
import org.springframework.stereotype.Repository;

/**
 * 收藏    Mapper  接口*
 *
 * @author LWG
 * @date 2022/7/23 11:24
 * @since 1.0.0@gene.cn
 */
@Repository
public interface CollectMapper {
    //增加收藏数量
    @DS("article")
    void addCollectCount(Long articleId);
    //减少收藏数量
    @DS("article")
    void reduceCollectCount(Long articleId);
    //插入收藏数据
    @DS("master")
    void insertCollectUser(Collect collect);
    //取消收藏
    @DS("master")
    void deleteCollectUserId(Long userId,Long articleId);
    //查询收藏所属模块
    @DS("article")
    Long selectModuleId(Long articleId);
    @DS("article")
    Integer selectCollections(Long articleId);

}
